package xyz.qduwo.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "User_Action", schema = "dbo", catalog = "streamboard")
public class UserActionEntity {
    private int id;
    private Integer journal;
    private Integer operator;
    private Integer type;
    private String content;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "journal")
    public Integer getJournal() {
        return journal;
    }

    public void setJournal(Integer journal) {
        this.journal = journal;
    }

    @Basic
    @Column(name = "operator")
    public Integer getOperator() {
        return operator;
    }

    public void setOperator(Integer operator) {
        this.operator = operator;
    }

    @Basic
    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserActionEntity that = (UserActionEntity) o;
        return id == that.id &&
                Objects.equals(journal, that.journal) &&
                Objects.equals(operator, that.operator) &&
                Objects.equals(type, that.type) &&
                Objects.equals(content, that.content);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, journal, operator, type, content);
    }
}
